package com.cnxdc.demo.service.impl;

import com.cnxdc.demo.mapper.ArticleMapper;
import com.cnxdc.demo.service.ArticleService;
import com.cnxdc.demo.vo.Article;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ArticleServiceImpl implements ArticleService {
    @Autowired
    private ArticleMapper articleMapper;
    @Override
    public void add(Article article) {
        articleMapper.insert(article);
    }

    @Override
    public List<Article> getall() {
        return articleMapper.selectList(null);
    }
}
